package com.hilin.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hilin.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author qhl
 * @since 2021-11-24
 */
@Data
@ApiModel("机构部门表")
@TableName("org_dept")
public class OrgDeptPo extends BaseEntity<OrgDeptPo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("部门id")
    @TableId(value = "dept_id", type = IdType.AUTO)
    private Long deptId;
    @ApiModelProperty("部门名称")
    @TableField("dept_name")
    private String deptName;
    @ApiModelProperty("父部门id")
    @TableField("dept_pid")
    private Long deptPid;
    @ApiModelProperty("父部门名称")
    @TableField("dept_pname")
    private String deptPname;
    @ApiModelProperty("存放所有父部门节点ID;父节点用'<'和'>'包裹，例如'<1><11>'")
    @TableField("dept_nodes")
    private String deptNodes;
    @ApiModelProperty("上级机构id")
    @TableField("org_pid")
    private Long orgPid;
    @ApiModelProperty("上级机构名称")
    @TableField("org_pname")
    private String orgPname;
    @ApiModelProperty("顶层机构ID")
    @TableField("org_root_id")
    private Long orgRootId;
    @ApiModelProperty("顶层机构名称")
    @TableField("org_root_name")
    private String orgRootName;
    @ApiModelProperty("创建人")
    private String creator;
    @ApiModelProperty("创建人类型")
    @TableField("creator_type")
    private String creatorType;
    @ApiModelProperty("创建时间")
    @TableField("creator_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creatorTime;
    @ApiModelProperty("更新人")
    private String updator;
    @ApiModelProperty("更新人类型")
    @TableField("updator_type")
    private String updatorType;
    @ApiModelProperty("更新时间")
    @TableField("updator_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatorTime;
}